package com.lh.java.junit;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class TestCalulatorAdvanced {
	private static Calculator calculator = new Calculator();
	@Before
	public void setUp() throws Exception {
	}

	
	@Test
	public void testSquareRoot() {
		int a = calculator.squareRoot(4);
		assertEquals(2, a);
	}
	
	@Test
	public void testSquareRoot2() {
		int a = calculator.squareRoot(-4);
		assertEquals(-2, a);
	}
	
	@Test
	public void testSquareRoot3() {
		int a =(int)calculator.squareRoot(0);
		assertEquals(0, a);
	}

}
